import { defineConfig } from 'vite'
import vue from '@vitejs/plugin-vue'

// https://vitejs.dev/config/
export default defineConfig({
  mode: 'development',
    server: {
      host: '0.0.0.0',
      port: 8887,
      open: true,
      fs: {
        strict: true,
      },
      proxy:{
        '/dev-api': {
          target:"http://127.0.0.1:8080",
          changeOrigin: true,
          rewrite: (path) => path.replace(/^\/dev-api/, '')
        }
      }
    },
  plugins: [vue()],
  resolve: {
    alias: {
      '@': '/src',
    },
  },
})
